﻿using UnityEngine;
using System.Collections;
using Dict.DataModel;

namespace Dict.Blo
{
    public class TableSceneBlo
    {
        public static string GetSceneMusic(string sceneName)
        {
            if(sceneName == "Login")
            {
                return string.Empty;
            }
            var ts = Dict.DictDataManager.Instance.tableSceneDao.GetById(sceneName);
            if(ts == null)
            {
                Debug.LogError("scene data no exist in table " + sceneName);
                return "";
            }
            else
            {
                return Dict.DictDataManager.Instance.tableSceneDao.GetById(sceneName).sceneMusic;
            }
        }

        public static TableScene GetSceneById(string sceneName)
        {
            return Dict.DictDataManager.Instance.tableSceneDao.GetById(sceneName);
        }
    }
}
